package com.example.child_protection.dto.request.add;

import com.example.child_protection.dto.base.BaseRequestDTO;
import com.example.child_protection.enums.SexEnums;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 儿童档案信息添加请求DTO
 * @date 2018-11-1
 * @author Biz
 */
@Getter
@Setter
public class ChildArchivesValuesInsertRequestDTO extends BaseRequestDTO {
    /**
     * 姓名
     *
     * @mbggenerated
     */
    @ApiParam(value = "档案编号",required = true)
    @NotNull
    private Long archivesId;
    /**
     * 姓名
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "姓名",required = true)
    private String name;

    /**
     * 性别
     *
     * @mbggenerated
     */
    @NotNull
    @ApiParam(value = "性别",required = true)
    private SexEnums sex;

    /**
     * 出生日期
     *
     * @mbggenerated
     */
    @ApiParam(value = "出生日期",required = true)
    @NotNull
    private Date age;

    /**
     * bmi指数
     *
     * @mbggenerated
     */
    @ApiParam(value = "bmi指数",required = false)
    private String bmi;

    /**
     * 民族
     *
     * @mbggenerated
     */
    @ApiParam(value = "民族",required = false)
    private String nation;

    /**
     * 儿童信息（json字符串）
     *
     * @mbggenerated
     */
    @ApiParam(value = "儿童信息（json字符串）（[{'attrId':'1','attrCode':'1','values':'1','values2':'1'}]）",required = true)
    @NotNull
    private String values;

    /**
     * 操作者编号
     */
    @ApiParam(value = "操作者编号",required = true)
    @NotNull
    private Long createPersonId;

    public void valid(){
        super.validate( this, new Class[0] );
    }
    public boolean isValidGid() {

        return false;
    }

}
